package com.adou.common.model;

import com.adou.common.dto.SearchConditionDto;
import com.adou.common.model.base.BaseEntity;
import org.apache.ibatis.type.Alias;

@Alias("SearchCondition")
public class SearchCondition  extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private Long id;

    private String ctype;

    private String cfindname1;

    private String cfindfield1;

    private String ccondition;

    private String cfindname2;

    private String cfindfield2;

    private Long ifid;

    private String keyWord;

    public SearchCondition(){

    }

    public SearchCondition(SearchConditionDto searchConditionDto){
        this.setId(searchConditionDto.getId());
        this.setCcondition(searchConditionDto.getCondition());
        this.setCfindfield1(searchConditionDto.getFindfield1());
        this.setCfindfield2(searchConditionDto.getFindfield2());
        this.setCfindname1(searchConditionDto.getFindname1());
        this.setCfindname2(searchConditionDto.getFindname2());
        this.setCtype(searchConditionDto.getType());
        this.setKeyWord(searchConditionDto.getKeyWord());
    }


    public String getKeyWord() {
        return keyWord;
    }

    public void setKeyWord(String keyWord) {
        this.keyWord = keyWord;
    }

    public Long getIfid() {
        return ifid;
    }

    public void setIfid(Long ifid) {
        this.ifid = ifid;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCtype() {
        return ctype;
    }

    public void setCtype(String ctype) {
        this.ctype = ctype == null ? null : ctype.trim();
    }

    public String getCfindname1() {
        return cfindname1;
    }

    public void setCfindname1(String cfindname1) {
        this.cfindname1 = cfindname1 == null ? null : cfindname1.trim();
    }

    public String getCfindfield1() {
        return cfindfield1;
    }

    public void setCfindfield1(String cfindfield1) {
        this.cfindfield1 = cfindfield1 == null ? null : cfindfield1.trim();
    }

    public String getCcondition() {
        return ccondition;
    }

    public void setCcondition(String ccondition) {
        this.ccondition = ccondition == null ? null : ccondition.trim();
    }

    public String getCfindname2() {
        return cfindname2;
    }

    public void setCfindname2(String cfindname2) {
        this.cfindname2 = cfindname2 == null ? null : cfindname2.trim();
    }

    public String getCfindfield2() {
        return cfindfield2;
    }

    public void setCfindfield2(String cfindfield2) {
        this.cfindfield2 = cfindfield2 == null ? null : cfindfield2.trim();
    }
}